import * as mongoose from 'mongoose';
import db2 from '../lib/db/mongodb2';


//备份数据
let ApprovalSchema2: mongoose.Schema = new mongoose.Schema(
    {
        sourceId: String,//审批实例的id
        code: String,//visitmonthPlan中的一条数据的id
        approver: String,//审批人
        approvalResult:String,//审批结果 驳回修改 同意通过
        approvalDate:String, //审批日期
        approvalMonth:String,//审批操作时所在当月的月份
        employeeId:String,//员工的id
        employeeDept:String//员工的部门id
    }, { collection: 'approval' });
export interface Approval2 extends mongoose.Document {
    sourceId: string;        //sourceId=code+approvalDate
    code: string; 
    approver:string;
    approvalResult:string;
    approvalDate:string;
    approvalMonth:string;
    employeeId:string;
    employeeDept:string
}
let approvalModel2 = db2.model<Approval2>('approval', ApprovalSchema2);
// let approvalModel2 = db2.model('approval2', ApprovalSchema2);
export default approvalModel2;
